import request from "@/utils/request";

// 查询客诉与处置列表
export function listComplaints(query) {
  return request({
    url: "/cld/complaints/list",
    method: "get",
    params: query,
  });
}

// 查询客诉与处置列表 - 按项目分组
export function groupProjectList(query) {
  return request({
    url: "/cld/complaints/groupProjectList",
    method: "get",
    params: query,
  });
}

// 查询客诉与处置详细
export function getComplaints(complaintsId) {
  return request({
    url: "/cld/complaints/" + complaintsId,
    method: "get",
  });
}

// 修改客诉与处置
export function updateComplaints(data) {
  return request({
    url: "/cld/complaints",
    method: "put",
    data: data,
  });
}

// 删除客诉与处置
export function delComplaints(complaintsId) {
  return request({
    url: "/cld/complaints/" + complaintsId,
    method: "delete",
  });
}



// 新增客诉与处置回复
export function addComplaintsReply(data) {
  return request({
    url: "/cld/complaints/addReply",
    method: "post",
    data: data,
  });
}
